<?php

namespace App\Http\Controllers;

use App\Contracts\EventPusher;
use App\Models\People;
use App\Repositories\CaptchaRepository;
use App\Repositories\SendSmsRepository;
use App\Services\Service;
use Illuminate\Http\Request;

class UserController extends Controller
{
    protected $variableName;

    public function __construct(People $people,$variableName,EventPusher $pusher)
    {
        $this->pusher = $pusher;
//        $this->people = $people;
//        $this->variableName = $variableName;
    }
    
    public function show($id)
    {
        return $this->pusher->pusher();

        $api = app()->make(People::class)->putDog();
        return $api;
        return app()->resolving(function ($api, $app){
            dd("1111") ;
            // Called when container resolves object of any type...
            \Log::info($api.'===='.$app);
        });
        $api = app()->makeWith('People', ['id' => 1]);
//        $api = app()->make('People')->putDog();
//        $api = resolve('People')->putDog();
        return $api;
        //return $this->people->putDog();
        return resolve('ReportAggregator')->chen(new SendSmsRepository());
//        return $this->variableName;
//        return resolve('People')->putDog(); // 只是绑定而已
        //
        $user = $this->users->find($id);
        return $user;
    }
}
